package org.simpleframework.aop.aspect;

import java.lang.reflect.Method;

public abstract class DefaultAspect {
    /**
     * 事前
     * @param targetClass
     * @param method
     * @param args
     */
    public void before(Class<?> targetClass, Method method, Object[] args) throws Throwable {}

    /**
     * 事后拦截
     * @param targetClass
     * @param method
     * @param args
     * @param returnValue
     * @return
     */
    public Object afterReturning(Class<?> targetClass,Method method,Object[] args,Object returnValue) throws Throwable {
        return returnValue;
    }

    /**
     *
     * @param targetClass
     * @param method
     * @param args
     * @param e
     * @throws Throwable
     */
    public void afterThrowing(Class<?> targetClass,Method method,Object[] args,Throwable e) throws Throwable {}

}
